#ifndef SERIAL_H
#define SERIAL_H

#include <avr/io.h>

#define SERIAL_BAUD 9600
#define SERIAL_BUF_SIZE 10

extern volatile char msg_rx[SERIAL_BUF_SIZE];
extern volatile char msg_tx[SERIAL_BUF_SIZE];
extern volatile uint8_t rx_buf_pos;
extern volatile uint8_t tx_buf_pos;
extern volatile uint8_t serial_rx;

extern void serial_init(unsigned int bittimer);
extern void serial_transmit(char data);
extern void serial_read_buffer(char* msg_var);

#endif /* SERIAL */
